]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
magnifier: Use the new get_client_content_rect API
authorBilal Elmoussaoui <belmouss@redhat.com>
Mon, 21 Oct 2024 10:39:57 +0000 (12:39 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 23 Nov 2024 12:16:34 +0000 (13:16 +0100)
As we have removed is_client_decorated from Mutter in the last release.
Instead of re-adding it and re-exposing SSD/CSD differences and making
gnome-shell deal with that, we created a new API that does exactly what
is_client_decorated was used for, so switch to using that.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7984

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3522>
(cherry picked from commit d92f8daf62ab5a9d1c02f82701d74a9f87ae01ee)

js/ui/magnifier.js

index bcfdda1d91290a251f84bc95a99d4b5deda77b4c..ac0826e0337d51eca50533b6d8481798e528aee5 100644 (file)
@@ -864,10 +864,7 @@ class ZoomRegion {
         if (!focusWindow)
             return null;
 
-        let windowRect = focusWindow.get_frame_rect();
-        if (!focusWindow.is_client_decorated())
-            windowRect = focusWindow.frame_rect_to_client_rect(windowRect);
-
+        const windowRect = focusWindow.get_client_content_rect();
         const scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
         const screenSpaceExtents = new Atspi.Rect({
             x: windowRect.x + (scaleFactor * extents.x),